import time

str_time = "2014-11-12 11:23:45"
t = time.strptime(str_time, "%Y-%m-%d %H:%M:%S")
#second
tstamp = int(time.mktime(t))
print tstamp
